﻿# CMakeList.txt: HelloOpenGL 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(TARGET_NAME "textures")
set(third_party "../third_party")
set(glfw_path "D:/Program Files/glfw")


project (${TARGET_NAME})

include_directories(
	"${glfw_path}/include"
	"${third_party}/glad/include"
)

set(HEADERS
	"Shader.h"
	"stb_image.h"
	"${third_party}/glad/include"
	"${glfw_path}/include"
)

set(SRCS 
	"Shader.cpp"
	"main.cpp")

set(LINK_LIBS ${LINK_LIBS}
	"${glfw_path}/lib/glfw3.lib"
)
message(STATUS "LINK_LIBS: ${LINK_LIBS}")

add_executable (${TARGET_NAME}
	"${HEADERS}"
	"${SRCS}"
	"${third_party}/glad/src/glad.c")

string(REPLACE "\\" "/" SOURCE_DIR_UNIX ${CMAKE_SOURCE_DIR})
add_definitions(-DPROJECT_ROOT_DIR="${SOURCE_DIR_UNIX}")

target_link_libraries(${TARGET_NAME} ${LINK_LIBS})
